<template>
  <div>
    <iframe src="http://127.0.0.1:6789" id="mobsf" scrolling="no" frameborder="0" style=""></iframe>
  </div>
</template>
 
 
<script>
 import TopNavbar from '../layout/TopNavbar.vue'
  import ContentFooter from '../layout/ContentFooter.vue'
  import DashboardContent from '../layout/Content.vue'
  import MobileMenu from '../layout/MobileMenu.vue'
  export default {
    components: {
      TopNavbar,
      ContentFooter,
      DashboardContent,
      MobileMenu
    },
    
    data () {
      return {
      }
    },
    mounted(){
      /**
      * iframe-宽高自适应显示   
      */
     this.$sidebar.displaySidebar(false);
      function changeMobsfIframe(){
        
        const mobsf = document.getElementById('mobsf');
        const deviceWidth = document.body.clientWidth;
        const deviceHeight = document.body.clientHeight;
        mobsf.style.width = (Number(deviceWidth)-280) + 'px'; //数字是页面布局宽度差值
        mobsf.style.height = (Number(deviceHeight)-80) + 'px'; //数字是页面布局高度差
      }
 
      changeMobsfIframe()
 
      window.onresize = function(){
        changeMobsfIframe()
      }
    },     
  }
</script>